Skip to content

Conversation

aleclarson
Copy link

@aleclarson aleclarson commented Jul 17, 2018

Changes I've made:

  • Handle empty matches differently
    • Exclude empty matches from the results
    • Increment the position instead of breaking out of the loop
       
  • Optimize non-global regexp
     
  • Optimize falsy string
     
  • Optimize first match
     

1. Exclude empty matches from the results.
2. Increment the position instead of breaking out of the loop.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant